## -*- coding: utf-8 -*-
<%inherit file="/base/blog_base.html"/>
<%namespace file="/derived/blog/blog.html" import="draft_show" />
<%namespace file="/component/utils.html" import="flash, paginate" />

<div id="main">
  <h3>草稿箱文章列表</h3>
  <div style="padding: 5px 0px 20px; color: red;">注意，草稿箱内的文章不会对外公布，只能被您自己看见！</div>
  ${flash()}
  <table width="100%">
    <thead>
      <tr style="background-color:#FEDDCA; margin-bottom:5px;">
        <td>标题</td>
        <td>创建时间</td>
        <td>最近更新时间</td>
        <td>分类</td>
        <td width="40px">管理</td>
      </tr>
    </thead>
    <tbody>
    % if len(c.drafts):
        % for post in c.drafts:
          ${draft_show(post)}
        % endfor

        % if c.drafts.last_page > 1:
        ${paginate(c.drafts, request.environ.get('PATH_INFO'))}
        % endif

    % endif
    </tbody>
  </table>
</div>

